
  <div class="span10 offset12">
		<?php 
			$locationtext ="&nbsp;";
			//刷新
			if(isset($backrefresh)){
				redirect($backrefresh, 'refresh');
			}
			else if(isset($crefresh)){
				redirect($crefresh, 'refresh');
			}
			
			
			if(isset($location)){
	
				$locationtext .=  "系统将在<span id='timeout' style='color:red'>".$timeout."</span>秒后自动跳转。";	
				//添加直接跳转连接
				$href = array('直接跳转'=>$location);
			}
		?>
        <div class="tips tips-large tips-<?php echo $type;?>">
          <span class="x-icon x-icon-<?php echo $type;?>"><i class="icon icon-<?php echo $status;?> icon-white"></i></span>
          <div class="tips-content">
            <h2>消息</h2>
            <p class="auxiliary-text">
              <?php	if(is_array($message)){
				foreach($message as $m){
					echo "<p>".$m."</p>";
				}
			//	echo $locationtext;
			}else{
				echo $message;
			}
				echo $locationtext;
			?>
            </p>
			
            <p>
			  <?php
				if($href){
				
						foreach($href as $key => $value){
						
							echo ' <a class="direct-lnk" title='.$key.' href="'.$value.'">'.$key.'</a>';
						}
					
				}
			  ?>
            </p>
          </div>
        </div>
    </div>

	<?php if(isset($location)){?>
	<script>
		//自动跳转
		var timeout = <?php echo $timeout; ?>;
		var timer = document.getElementById('timeout');
		if(timer !=='undefined'){
				setInterval(function (){
				timer.innerHTML = timeout;
					if(timeout<=1){
						window.location.href= "<?php echo $location;?>";
						return;
					}
						timeout --;
			},1000);
		}
			
	</script>
	<?php }?>
	
